package com.ywd.platform.netty.result;

/**
 * 服务器状态信息类
 */
public class ServerStatus {
    private final boolean running;
    private final String host;
    private final int port;
    private final int bossThreads;
    private final int workerThreads;

    public ServerStatus(boolean running, String host, int port, int bossThreads, int workerThreads) {
        this.running = running;
        this.host = host;
        this.port = port;
        this.bossThreads = bossThreads;
        this.workerThreads = workerThreads;
    }

    // Getter方法
    public boolean isRunning() { return running; }
    public String getHost() { return host; }
    public int getPort() { return port; }
    public int getBossThreads() { return bossThreads; }
    public int getWorkerThreads() { return workerThreads; }

    @Override
    public String toString() {
        return String.format("ServerStatus{running=%s, host='%s', port=%d, bossThreads=%d, workerThreads=%d}",
                running, host, port, bossThreads, workerThreads);
    }
}
